package com.niit.web.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.niit.bean.Admin;
import com.niit.service.AdminService;
import com.niit.service.impl.AdminServiceImpl;

@WebServlet("/ShowAdminController")
public class ShowAdminController extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		AdminService asd = new AdminServiceImpl();
		List<Admin> list = asd.findAll();
		request.setAttribute("list", list);
		System.out.println(list.size());
		request.getRequestDispatcher("/jsp/admin/load/sysmsuper.jsp").forward(request, response);
	}

}
